package com.java.zhuiyun.api.pictureidiomquestion.dao;

import com.java.zhuiyun.api.pictureidiomlevel.model.PictureIdiomLevelModel;
import com.java.zhuiyun.api.pictureidiomquestion.entity.PictureIdiomQuestion;
import com.java.zhuiyun.api.pictureidiomquestion.model.PictureIdiomQuestionModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @ClassName PictureIdiomQuestionMapper
 * @Description TODO
 * @Author MJL
 * @Date 2023/9/14 16:58
 **/
@Mapper
public interface PictureIdiomQuestionMapper {
    int addPictureIdiomQuestion(PictureIdiomQuestionModel pictureIdiomQuestionModel);

    List<PictureIdiomQuestion> queryPictureIdiomQuestion(PictureIdiomQuestionModel pictureIdiomQuestionModel);

    List<PictureIdiomQuestion> getByIdIdiom(Integer id);
    int updatePictureIdiom(PictureIdiomQuestionModel pictureIdiomQuestionModel);
    List<PictureIdiomQuestion> getByIdIdiomByLevel(Integer level);

    @Update("update picture_idiom_question set del_flag = 1 where FIND_IN_SET(id,#{Id})")
    Integer deletePictureIdiom(String id);

    List<PictureIdiomLevelModel> queryLevelNum(Integer id);

    List<PictureIdiomLevelModel> queryLevel(Integer id);
    @Update("update picture_idiom_question set del_flag = 1 where id = #{id}")
    Integer deletePictureIdioms(Integer id);
}
